package vn.info.vietnaminfo.db;

import android.content.Context;
import android.database.sqlite.SQLiteDatabase;

public class BaseDao
{
    protected Context context;
    protected DBHelper helper;
    protected SQLiteDatabase db;

    public BaseDao(Context context)
    {
        this.context = context;
        helper = new DBHelper(context);
    }

    public void open()
    {
        db = helper.getWritableDatabase();
    }

    public void close()
    {
        if (db != null && db.isOpen())
        {
            db.close();
        }
    }
}